updating oE sum
Accumulation
sum
include math.e namespace math public function sum(object a)
computes the sum of all atoms in the argument, no matter how deeply nested.
Parameters:
- values : an object, all atoms of which will be added up, no matter how nested.
Returns:
An atom, the sum of all atoms in flatten(values).
Comments:
This function may be applied to an atom or to all elements of a sequence.
Example 1:
a = sum({10, 20, 30}) -- a is 60 a = sum({10.5, {11.2} , 8.1}) -- a is 29.8
See Also:
Not Categorized, Please Help
|